<!DOCTYPE HTML>
<html>
<head>
    <title>SpringBoot集成thymeleaf</title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <style type="text/css">
        .card-layout {
            background: lightgray;
            padding: 10px;
            margin: 20px;
            border-radius: 10px;
        }

        .flex-grid {
            display: flex;
            flex-flow: wrap;
        }

        .img-view {
            width: 30%;
            margin: 7px;
            height: 150px;
            object-fit: contain;
            word-break: break-all;
        }
    </style>
</head>
<body>
<div class="card-layout">
    <p th:text="${hello}">这是的内容将被替换</p>
    <form enctype="multipart/form-data" method="post" action="/upload/uploadFile">
        文件: <input type="file" name="fileUpload" required/>
        <input type="submit" value="上传"/>
    </form>
</div>
<div class="card-layout">
    <h5>workplace目录下的文件:</h5>
    <ul>
        <li th:each="name:${list}">[[${name}]]</li>
    </ul>
    <h5>workplace目录下的图片加载:</h5>
    <div class="flex-grid">
        <img class="img-view" th:each="path:${list}" th:src="${path}" th:alt="${path}">
    </div>
</div>
</body>
</html>
